package org.spotem.dao;

import org.spotem.model.TrackPointImpl;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TrackPointRepo extends JpaRepository<TrackPointImpl, Long> {

    @Query("select tp from TrackPointImpl tp where tp.track.key = ?1 and tp.id > ?2 order by tp.time")
    public List<TrackPointImpl> findPoints(String trackKey, Long minId);
}
